﻿using Nop.Plugin.Misc.TabManager.Infrastructure;
using Nop.Web.Framework.Mvc.Routes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using System.Web.Routing;
namespace Nop.Plugin.Misc.TabManager
{
    public class RouteConfig : IRouteProvider
    {
        public int Priority
        {
            get { return 0; }
        }

        public void RegisterRoutes(RouteCollection routes)
        {
            routes.MapRoute("Plugin.Misc.TabManager.ManageTabs",
                "TabManager/{action}",
                new { controller = "TabManager", action = "ManageTabs" },
                new[] { "Nop.Plugin.Misc.TabManager.Controllers" }
              );

            routes.MapRoute("Plugin.Misc.TabManager.ConfigureTabs",
              "TabManager/{action}",
              new { controller = "TabManager", action = "ConfigureTabs" },
              new[] { "Nop.Plugin.Misc.TabManager.Controllers" }
              );

            routes.MapRoute("Plugin.Misc.TabManager.TabMenu",
              "TabManager/{action}",
              new { controller = "TabManager", action = "TabMenu" },
              new[] { "Nop.Plugin.Misc.TabManager.Controllers" }
              );


            ViewEngines.Engines.Add(new CustomViewEngine());
        }
    }
}
